Lazy(T) Constructor (LazyThreadSafetyMode)

Task Parallel System.Threading

Initializes a new instance of the Lazy<(Of <(T>)>) class that uses T's default constructor and a specified thread-safety mode.

Namespace:  System
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	mode As LazyThreadSafetyMode _
)
C#
public Lazy(
	LazyThreadSafetyMode mode
)

Parameters

mode
Type: System.Threading..::.LazyThreadSafetyMode
The lazy thread-safety mode mode

Exceptions

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionmode mode contains an invalid valuee

See Also